$(function () {
    var token = $("#token").val();
    if (isempty(token))
        token = "null";
    var jsonstr = "{token:" + token + "}";
    var url = "/except/shopcontroller/shoppricelist.do";
    $.ajax({
        url: url,
        type: 'post',
        dataType: "json",
        data: {
            json: jsonstr,
        },
        async: false,
        success: function (data) {
            //console.log(data);
            var code = data.code;
            var message = data.message;
            if (code == 20013)
                flag = true;
            else if (code == 20000) {
                var datas = data.data.list;
                var shopinfo = "";
                var proxyprice = "";
                $(datas).each(function () {
                    shopinfo += '<tr>'+
                        '<td>'+this.shopname+'</td>'+
                        '<td>'+this.name+'</td>'+
                        '</tr>';
                    proxyprice += '<tr>'+
                        '<td>￥'+this.price+'</td>'+
                        '<td>￥'+this.first+'</td>'+
                        '<td>￥'+this.second+'</td>'+
                        '<td>￥'+this.third+'</td>'+
                        '<td>￥'+this.forth+'</td>'+
                        '<td>￥'+this.fifth+'</td>'+
                        '</tr>';
                });
                $("#shopinfo").empty().append(shopinfo);
                $("#proxyprice").empty().append(proxyprice);
                remove_advertising();
            }
        }
    });
});